﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="EvaluationMgm.aspx.cs" Inherits="Skynet.WebSite.Evaluation.EvaluationMgm" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="AjaxContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="Id" DataSourceID="odsExamByCustomer">
        <Columns>
            <asp:CommandField ShowSelectButton="True" />
            <asp:BoundField DataField="Id" HeaderText="Id" />
            <asp:BoundField DataField="Category" HeaderText="Category" />
            <asp:BoundField DataField="Title" HeaderText="Title" />            
            <asp:BoundField DataField="Duration" HeaderText="Duration" />  
        </Columns>
    </asp:GridView>
    <asp:ObjectDataSource ID="odsExamByCustomer" runat="server" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="GetActiveExams" 
        TypeName="Skynet.WebAdministracion.Views.EvaluationMgm.EvaluationMgmPresenter">
    </asp:ObjectDataSource>
    <br />
    <asp:FormView ID="FormView1" runat="server"  
        DataSourceID="odsWorkExamByCustomer" Width="100%" DataKeyNames="Id">
        <ItemTemplate>
            <fieldset>
                <legend> Exam Information</legend>
                <table border="0" cellpadding="5" cellspacing="5" width="100%">
                <tr>
                    <td>
                        Category
                    </td>
                    <td>
                         <%# Eval("Category")%>
                    </td>
                </tr>
                <tr>
                    <td>
                        Title
                    </td>
                    <td>
                         <%# Eval("Title")%>
                    </td>
                </tr>
                <tr>
                    <td>
                        Duration
                    </td>
                    <td>
                         <%# Eval("Duration")%>
                    </td>
                </tr>
                <tr>
                    <td>
                        Valid 
                    </td>
                    <td>
                         <%# Eval("ValidFrom")%> - <%# Eval("ValidTo")%>
                    </td>
                </tr>
                <tr>
                    <td>
                        Take Exam
                    </td>
                    <td>
                        <asp:LinkButton ID="btnAccept" Text="Accept" runat="server"  OnClick="btnAccept_click"   />
                    </td>
                </tr>
                </table>
            </fieldset>               
        </ItemTemplate>
    </asp:FormView>
    <asp:ObjectDataSource ID="odsWorkExamByCustomer" runat="server" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="GetActiveExams" 
        TypeName="Skynet.WebAdministracion.Views.EvaluationMgm.EvaluationMgmPresenter">
        <SelectParameters>
            <asp:ControlParameter ControlID="GridView1" DbType="Guid" 
                Name="ExamByCustomerId" PropertyName="SelectedValue" />
        </SelectParameters>
        
    </asp:ObjectDataSource>
</asp:Content>
